import request from '@/utils/request'
//所有关于课程的接口
export function _addCourse(data) {
    return request('/VueHandler/CourseHandler?action=add', 'post', data)
}
//课程信息请求的接口
export function _getCourse(ID) {
    return request("/VueHandler/CourseHandler?action=getcourse", "get", {
        ID: ID,
    })
}
//添加目录接口
export function _addDir(data) {
    return request("/VueHandler/CourseHandler?action=AddDirectory", "post", data)
}
//删除目录接口
export function _delDir(_id, CDid) {
    return request("/VueHandler/CourseHandler?action=deleteDirectory", "get", {
        _id: _id, //目录的_id
        CDid: CDid, //课程_id
    })
}
//编辑目录接口
export function _EditDir(data) {
    return request(
        "/VueHandler/CourseHandler?action=updateDirectory",
        "post",
        data
    )
}
//获取目录下的视频
export function _getDirVideo(data){
    return request("/VueHandler/VideoHandler?action=showdir", "get", data)
}
//给对相应的目录添加视频
export function _addDirVideo(data){
    return request("/VueHandler/CourseHandler?action=addvideo", "get", data)
}
//删除 目录下的视频
export function _delDirVideo(data){
    return request('/VueHandler/CourseHandler?action=delvideo','get',data)
}
//整个课程的编辑提交
export function _SaveAll(data){
    return request('/VueHandler/CourseHandler?action=update','post',data)
}